<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>侯体宗</title>
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="../css/adm.css">
</head>
<body>
    <header>
        <h1>侯体宗Blog后台管理界面</h1>
    </header>
    <div id="main">

<!--左侧公共区域-->
<?php include(ROOT.'view/admin/left.html'); ?>

        <div id="rside">
            <form action="" method="post" enctype="multipart/form-data">
            <?php foreach ($values as $v) { ?>   
                <div class="form-group">
                    <label>修改标题:</label>
                    <p>
                    <input type="text" name="title" value="<?php echo $v['title'];?>">
                    </p>
                </div>
                <div class="form-group">
                    <label>修改栏目:</label>
                    <p> 
                        <select name="cat_id">
                        <?php foreach ($catname as $c) {?>
                            <option value="<?php echo $c['cat_id'];?>"
                                <?php if($c['cat_id']==$v['cat_id']) {?>
                                selected="selected"
                                <?php }?>
                                >
                            <?php echo $c['catname'];?></option>
                        <?php }?>    
                        </select>   
                    </p>
                </div>
                <div class="form-group">
                    <label >修改内容:</label>
                    <p>
                    <textarea name="content" id="content">
                        <?php echo $v['content'];?>
                    </textarea>
                    </p>
                </div>
                <div class="form-group">
                    <label >图片上传:</label>
                    <p>
                <input type="file" name="org_img" value="<?php echo $v['org_img'];?>">
                    </p>
                </div> 
                <div class="form-group">
                    <label>修改标签:</label>
                    <p>
                    <input type="text" name="tags" value="<?php echo $v['tags'];?>">
                    </p>
                </div>
                <div class="form-group">
                    <label>&nbsp;</label>
                    <p>
                        <button type="submit">确认提交</button>
                    </p>
                </div>
            <?php }?>    
            </form>
        </div>
    </div>
<!--编辑器-->
<script type="text/javascript" src="../lib/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../lib/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('content',{
        toolbars: [['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder','snapscreen','scrawl','insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'pagebreak', 'template', '|',]],initialFrameWidth:516,initialFrameHeight:300});
</script> 

    <footer>
        Copyright &copy; 2016 · GeneratePress · WordPress
    </footer>
</body>
</html>